In recent years, portable terminals, such as smartphones, provided with a proximity sensor has been in widespread use. The proximity sensor provided in a portable terminal is used for various purposes. For example, in order to prevent malfunctions of a touch panel of a smartphone due to the approach of a user's face, ear, or the like to the smartphone when the user makes a phone call, the proximity sensor detects the approach of an object to be detected, and the touch panel is controlled on the basis of the detection result (see JP 2015-014932 A).